package com.wali.modules.bil.enums;

/**
 * @author walixu
 * @ClassName com.wali.modules.bil.enums
 * @Description ${todo}
 * @email wali.xu@kpmg.com
 * @date 26/01/2019 10:26 上午
 */
public enum BilLogisticsEnums {

    /**
     * 1 运单创建成功
     * 2 分店已收件
     * 3 快件中心已揽收
     * 4 已发往国内
     * 5 已到达海关,清关中
     * 6 海关抽检中
     * 7 海关抽检中
     */
    BIL_CREATE_SUCCESS(1, "运单创建成功"),

    BIL_GETIN_SUCCESS(2, "分店已收件"),

    BIL_PICKUP_SUCCESS(3, "快件中心已揽收"),

    BIL_CHINA_SUCCESS(4, "已发往国内"),

    BIL_CLEAR_ING(5, "已到达海关,清关中"),

    BIL_CHECK_ING(6, "海关抽检中"),

    BIL_CLEAR_SUCCESS(7, "清关完毕"),

    ;

    /**
     * 物流状态
     */
    private int state;

    /**
     * 物流信息
     */
    private String message;

    BilLogisticsEnums(int state, String message) {
        this.state = state;
        this.message = message;
    }

    public int getState() {
        return state;
    }

    public String getMessage() {
        return message;
    }

    public static String getMessage(int state) {
        String msg = null;
        switch (state) {
            case 1:
                msg = BIL_CREATE_SUCCESS.message;
                break;
            case 2:
                msg = BIL_GETIN_SUCCESS.message;
                break;
            case 3:
                msg = BIL_PICKUP_SUCCESS.message;
                break;
            case 4:
                msg = BIL_CHINA_SUCCESS.message;
                break;
            case 5:
                msg = BIL_CLEAR_ING.message;
                break;
            case 6:
                msg = BIL_CHECK_ING.message;
                break;
            case 7:
                msg = BIL_CLEAR_SUCCESS.message;
                break;
        }
        return msg;
    }
}
